<template>
	<div class="app">
		<h1>我是App组件</h1>
		<h3>我有台车：{{car}}</h3>
		<h3 v-show="computer">儿子给的电脑：{{computer}}</h3>
		<Child :car="car" :getComputer="getComputer"/>
	</div>
</template>

<script>
	import Child from './components/Child'

	export default {
		name:'App',
		components:{Child},
		data() {
			return {
				car:'奔驰C63',
				computer:''
			}
		},
		methods:{
			getComputer(c){
				this.computer = c
			}
		}
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>